\chapter{控制信号表}
\tablehead{
\hline
op\_code & op\_name & im-extend & reg1 & reg2 & rwrite & ALUOP & r1/pc & r2/im & MEM\_IO\tabularnewline
\hline
}
\tabletail{
\hline
}
\addtolength{\oddsidemargin}{-.875in} 
\addtolength{\evensidemargin}{-.875in} 
\addtolength{\textwidth}{1.75in}
\begin{supertabular}{|l|l|l|l|l|l|l|l|l|l|}
\hline
000000 & OP\_NOP & EX\_NONE & rx &  & rx & REG1 & 0 & 0 & none\tabularnewline
\hline
000001 & OP\_ADDIU & EX\_S8 & rx &  & rx & ADD & 0 & 1 & none\tabularnewline
\hline
000010 & OP\_ADDIU3 & EX\_S4 & rx &  & ry & ADD & 0 & 1 & none\tabularnewline
\hline
000011 & OP\_ADDSP3 & EX\_S8 & sp &  & rx & ADD & 0 & 1 & none\tabularnewline
\hline
000100 & OP\_ADDSP & EX\_S8 & sp &  & sp & ADD & 0 & 1 & none\tabularnewline
\hline
000101 & OP\_ADDU & EX\_NONE & rx & ry & rz & ADD & 0 & 0 & none\tabularnewline
\hline
000110 & OP\_AND & EX\_NONE & rx & ry & rx & AND & 0 & 0 & none\tabularnewline
\hline
000111 & OP\_B & EX\_S11 & pc &  & pc & REG1 & 1 & 1 & none\tabularnewline
\hline
001000 & OP\_BEQZ & EX\_S8 & rx(pc) &  & pc & REG1 & 1 & 1 & none\tabularnewline
\hline
001001 & OP\_BNEZ & EX\_S8 & rx(pc) &  & pc & REG1 & 1 & 1 & none\tabularnewline
\hline
001010 & OP\_BTEQZ & EX\_S8 & t(pc) &  & pc & REG1 & 1 & 1 & none\tabularnewline
\hline
001011 & OP\_BTNEZ & EX\_S8 & t(pc) &  & pc & REG1 & 1 & 1 & none\tabularnewline
\hline
001100 & OP\_CMP & EX\_NONE & rx & ry & t & SUB & 0 & 0 & none\tabularnewline
\hline
001101 & OP\_CMPI & EX\_S8 & rx &  & t & SUB & 0 & 1 & none\tabularnewline
\hline
001110 & OP\_INT & EX\_INT & ???? &  &  & ??? & 0 & 0 & none\tabularnewline
\hline
001111 & OP\_JALR & EX\_NONE & rx &  & ra(pc) & REG1 & 0 & 0 & none\tabularnewline
\hline
010000 & OP\_JR & EX\_NONE & rx &  & pc & REG1 & 0 & 0 & none\tabularnewline
\hline
010001 & OP\_JRRA & EX\_NONE & ra &  & pc & REG1 & 0 & 0 & none\tabularnewline
\hline
010010 & OP\_LI & EX\_U8 &  &  & rx & REG2 & 0 & 1 & none\tabularnewline
\hline
010011 & OP\_LW & EX\_S5 & rx &  & ry & ADD & 0 & 1 & read\tabularnewline
\hline
010100 & OP\_LW\_SP & EX\_S8 & sp &  & rx & ADD & 0 & 1 & read\tabularnewline
\hline
010101 & OP\_MFIH & EX\_NONE & ih &  & rx & REG1 & 0 & 0 & none\tabularnewline
\hline
010110 & OP\_MFPC & EX\_NONE & pc &  & rx & REG1 & 1 & 0 & none\tabularnewline
\hline
010111 & OP\_MOVE & EX\_NONE & ry &  & rx & REG1 & 0 & 0 & none\tabularnewline
\hline
011000 & OP\_MTIH & EX\_NONE & rx &  & ih & REG1 & 0 & 0 & none\tabularnewline
\hline
011001 & OP\_MTSP & EX\_NONE & ry{*} &  & sp & REG & 0 & 0 & none\tabularnewline
\hline
011010 & OP\_NEG & EX\_NONE & ry &  & rx & NEG & 0 & 0 & none\tabularnewline
\hline
011011 & OP\_NOT & EX\_NONE & ry &  & rx & NOT & 0 & 0 & none\tabularnewline
\hline
011100 & OP\_OR & EX\_NONE & rx & ry & rx & OR & 0 & 0 & none\tabularnewline
\hline
011101 & OP\_SLL & EX\_SHIFT & ry &  & rx & SLL & 0 & 1 & none\tabularnewline
\hline
011110 & OP\_SLLV & EX\_NONE & rx & ry & ry & SLL & 0 & 0 & none\tabularnewline
\hline
011111 & OP\_SLT & EX\_NONE & rx & ry & t & LESS & 0 & 0 & none\tabularnewline
\hline
100000 & OP\_SLTI & EX\_S8 & rx &  & t & LESS & 0 & 1 & none\tabularnewline
\hline
100001 & OP\_SLTU & EX\_NONE & rx & ry & t & LESSU & 0 & 0 & none\tabularnewline
\hline
100010 & OP\_SLTUI & EX\_U8 & rx &  & t & LESSU & 0 & 1 & none\tabularnewline
\hline
100011 & OP\_SRA & EX\_SHIFT & ry &  & rx & SRA & 0 & 1 & none\tabularnewline
\hline
100100 & OP\_SRAV & EX\_NONE & ry & rx & ry & SRA & 0 & 0 & none\tabularnewline
\hline
100101 & OP\_SRL & EX\_SHIFT & ry &  & rx & SRL & 0 & 1 & none\tabularnewline
\hline
100110 & OP\_SRLV & EX\_NONE & ry & rx & ry & SRL & 0 & 0 & none\tabularnewline
\hline
100111 & OP\_SUBU & EX\_NONE & rx & ry & rz & SUB & 0 & 0 & none\tabularnewline
\hline
101000 & OP\_SW & EX\_S5 & rx & m(ry) &  & ADD & 0 & 1 & write\tabularnewline
\hline
101001 & OP\_SW\_RS & EX\_S8 & sp & m(ra) &  & ADD & 0 & 1 & write\tabularnewline
\hline
101010 & OP\_SW\_SP & EX\_S8 & sp & m(rx) &  & ADD & 0 & 1 & write\tabularnewline
\hline
101011 & OP\_XOR & EX\_NONE & rx & ry & rx & XOR & 0 & 0 & none\tabularnewline
\hline
101100 & OP\_INT1 & EX\_S5 & sp & m(pc) &  & ADD & 0 & 1 & write\tabularnewline
\hline
101101 & OP\_INT2 & EX\_U8 & sp & m(im) & sp & SUB2 & 0 & 1 & write\tabularnewline
\hline
101110 & OP\_INT3 & EX\_U8 & ih &  & ih & AND & 0 & 1 & none\tabularnewline
\hline
\end{supertabular}

\newpage
\addtolength{\oddsidemargin}{.875in} 
\addtolength{\evensidemargin}{.875in} 
\addtolength{\textwidth}{-1.75in}
\begin{center}
\tablehead{
\hline
\multicolumn{3}{|l|}{} & \multicolumn{5}{c|}{instruction structure}\tabularnewline
\hline
op\_code & op\_name & description & 15\_11 & 10\_8 & 7\_5 & 4\_2 & 1\_0\tabularnewline
\hline
}
\begin{supertabular}{|l|l|l|c|c|c|c|c|}
000000 & OP\_NOP & NOP & 00001 & 000 & 000 & 000 & 00\tabularnewline
\hline
000001 & OP\_ADDIU & rx=rx,im & 01001 & rx & \multicolumn{3}{c|}{imm}\tabularnewline
\hline
000010 & OP\_ADDIU3 & ry=rx,im & 01000 & rx & ry & \multicolumn{2}{c|}{0 imm}\tabularnewline
\hline
000011 & OP\_ADDSP3 & rx=sp,im & 00000 & rx & \multicolumn{3}{c|}{imm}\tabularnewline
\hline
000100 & OP\_ADDSP & sp=sp,im & 01100 & 011 & \multicolumn{3}{c|}{imm}\tabularnewline
\hline
000101 & OP\_ADDU & rz=rx,ry & 11100 & rx & ry & rz & 01\tabularnewline
\hline
000110 & OP\_AND & rx=rx,ry & 11101 & rx & ry & 011 & 00\tabularnewline
\hline
000111 & OP\_B & pc=pc,im & 00010 & \multicolumn{4}{c|}{imm}\tabularnewline
\hline
001000 & OP\_BEQZ & pc=pc,im(rx==0) & 00100 & rx & \multicolumn{3}{c|}{imm}\tabularnewline
\hline
001001 & OP\_BNEZ & pc=pc,im(rx!=0) & 00101 & rx & \multicolumn{3}{c|}{imm}\tabularnewline
\hline
001010 & OP\_BTEQZ & pc=pc,im(t==0) & 01100 & 000 & \multicolumn{3}{c|}{imm}\tabularnewline
\hline
001011 & OP\_BTNEZ & pc=pc,im(t!=0) & 01100 & 001 & \multicolumn{3}{c|}{imm}\tabularnewline
\hline
001100 & OP\_CMP & t=rx,ry & 11101 & rx & ry & 010 & 10\tabularnewline
\hline
001101 & OP\_CMPI & t=rx,im & 01110 & rx & \multicolumn{3}{c|}{imm}\tabularnewline
\hline
001110 & OP\_INT & ???????? & 11111 & 000 & 000 & \multicolumn{2}{c|}{0 imm}\tabularnewline
\hline
001111 & OP\_JALR & pc=rx  ra=rpc & 11101 & rx & 110 & 000 & 00\tabularnewline
\hline
010000 & OP\_JR & pc=rx & 11101 & rx & 000 & 000 & 00\tabularnewline
\hline
010001 & OP\_JRRA & pc=ra & 11101 & 000 & 001 & 000 & 00\tabularnewline
\hline
010010 & OP\_LI & rx=im & 01101 & rx & \multicolumn{3}{c|}{imm}\tabularnewline
\hline
010011 & OP\_LW & ry=m{[}rx,im{]} & 10011 & rx & ry & \multicolumn{2}{c|}{imm}\tabularnewline
\hline
010100 & OP\_LW\_SP & rx=m{[}sp,im{]} & 10010 & rx & \multicolumn{3}{c|}{imm}\tabularnewline
\hline
010101 & OP\_MFIH & rx=ih & 11110 & rx & 000 & 000 & 00\tabularnewline
\hline
010110 & OP\_MFPC & rx=pc & 11101 & rx & 010 & 000 & 00\tabularnewline
\hline
010111 & OP\_MOVE & rx=ry & 01111 & rx & ry & 000 & 00\tabularnewline
\hline
011000 & OP\_MTIH & ih=rx & 11110 & rx & 000 & 000 & 01\tabularnewline
\hline
011001 & OP\_MTSP & sp=ry{*} & 01100 & 100 & ry{*} & 000 & 00\tabularnewline
\hline
011010 & OP\_NEG & rx=-ry & 11101 & rx & ry & 010 & 11\tabularnewline
\hline
011011 & OP\_NOT & rx=!ry & 11101 & rx & ry & 011 & 11\tabularnewline
\hline
011100 & OP\_OR & rx=rx,ry & 11101 & rx & ry & 011 & 01\tabularnewline
\hline
011101 & OP\_SLL & rx=ry,im & 00110 & rx & ry & imm & 00\tabularnewline
\hline
011110 & OP\_SLLV & ry=ry,rx & 11101 & rx & ry & 001 & 00\tabularnewline
\hline
011111 & OP\_SLT & t=rx<ry & 11101 & rx & ry & 000 & 10\tabularnewline
\hline
100000 & OP\_SLTI & t=rx<im & 01010 & rx & \multicolumn{3}{c|}{imm}\tabularnewline
\hline
100001 & OP\_SLTU & t=rx<ry & 11101 & rx & ry & 000 & 11\tabularnewline
\hline
100010 & OP\_SLTUI & t=rx<im & 01011 & rx & \multicolumn{3}{c|}{imm}\tabularnewline
\hline
100011 & OP\_SRA & rx=ry,im & 00110 & rx & ry & imm & 11\tabularnewline
\hline
100100 & OP\_SRAV & ry=ry,rx & 11101 & rx & ry & 001 & 11\tabularnewline
\hline
100101 & OP\_SRL & rx=ry,im & 00110 & rx & ry & imm & 10\tabularnewline
\hline
100110 & OP\_SRLV & ry=ry,rx & 11101 & rx & ry & 001 & 10\tabularnewline
\hline
100111 & OP\_SUBU & rz=rx,ry & 11100 & rx & ry & rz & 11\tabularnewline
\hline
101000 & OP\_SW & m{[}rx,im{]}=ry & 11011 & rx & ry & \multicolumn{2}{l|}{imm}\tabularnewline
\hline
101001 & OP\_SW\_RS & m{[}sp,im{]}=ra & 01100 & 010 & \multicolumn{3}{c|}{imm}\tabularnewline
\hline
101010 & OP\_SW\_SP & m{[}sp,im{]}=rx & 11010 & rx & \multicolumn{3}{c|}{imm}\tabularnewline
\hline
101011 & OP\_XOR & rx=rx,ry & 11101 & rx & ry & 011 & 10\tabularnewline
\hline
101100 & OP\_INT1 & {[}sp-1{]}=pc & 00011 & 001 & 000 & \multicolumn{2}{l|}{imm(11111)}\tabularnewline
\hline
101101 & OP\_INT2 & {[}sp-2{]}=im,sp-=2 & 00011 & 010 & \multicolumn{3}{c|}{imm}\tabularnewline
\hline
101110 & OP\_INT3 & ih=ih\&7fff,pc=ih & 00011 & 100 & \multicolumn{3}{c|}{imm(FF)}\tabularnewline
\hline
\end{supertabular}
\end{center}
